Current Location: Home> Function Categories> pi

pi

Get the pi value
Name:pi
Category:math
Programming Language:php
One-line Description:Returns the value of Pi.

Definition and usage

The pi() function returns the value of pi.

Example

 <?php
echo pi ( ) ;
?>

Try it yourself

grammar

 pi ( )

illustrate

Returns an approximation of pi. The float accuracy of the return value is determined by the precision directive in php.ini. The default value is 14. You can also use the M_PI constant that produces the exact same result as pi() .

Similar Functions
  • Leave the method of sorting floor

    floor

    Leavethemethodofsort
  • Determine whether it is infinite is_infinite

    is_infinite

    Determinewhetheritis
  • Convert hexadecimal to decimal hexdec

    hexdec

    Converthexadecimalto
  • Perform floating point division under IEEE 754 semantics fdiv

    fdiv

    Performfloatingpoint
  • Arctangle of two parameters atan2

    atan2

    Arctangleoftwoparame
  • Generate a random integer rand

    rand

    Generatearandominteg
  • Round floating point numbers round

    round

    Roundfloatingpointnu
  • Inverse hyperbolic sine asinh

    asinh

    Inversehyperbolicsin
Popular Articles